package 二叉树;

public class TestDemo {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        TreeNode root = binaryTree.createTree();

        binaryTree.preOrderTraversal(root);
        System.out.println();
        binaryTree.preOrderTraversalNor(root);

        binaryTree.inOrderTraversal(root);
        System.out.println();
        binaryTree.inOrderTraversalNor(root);

        binaryTree.postOrderTraversal(root);
        System.out.println();

        binaryTree.getSize1(root);
        System.out.println(BinaryTree.size);//size 为静态变量，需要通过类名调用

        binaryTree.getLeafSize1(root);
        System.out.println(BinaryTree.leafSize);

        System.out.println(binaryTree.getLeafSize2(root));

        System.out.println(binaryTree.getKLevelSize(root,3));

        System.out.println(binaryTree.find(root,'A').val);

        System.out.println(binaryTree.getHeight(root));

        binaryTree.levelOrderTraversal(root);

        System.out.println(binaryTree.isCompleteTree(root));



    }

}
